/*
 * Guud.cpp
 *
 *  Created on: 2013-1-19
 *      Author: heqiu
 */

#include "Guud.h"

namespace guud {
void guud_exit(const char * pFile, int iLen, int iRet, const char * pErr) {
	printf("[%s][%d]err: iRet=%d err=%s\n", pFile, iLen, iRet, pErr);
	TTF_Quit();
	SDL_Quit();
	exit(0);
}
void guud_init() {
	if (SDL_Init(SDL_INIT_EVERYTHING) == -1) {
		guud_exit(__FILE__, __LINE__, -1, "SDL_Init");
	}
	TTF_Init();
}

void guud_sleep(uint32_t uiMSec) {
	SDL_Delay(uiMSec);
}
}
